<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/tabdemo.css"/>
		<script src="js/jquery-3.6.0.js"></script>
		<script type="text/javascript">
			$(function(){
				//199000239 牟晓伟
				//实现当单击任一按钮时，为按钮添加类btnCls，其他按钮移除类btnCls
				$(".hd ul li").click(function(){
					$(this).addClass("on");				//添加样式
					$(this).siblings( "li" ).removeClass ( "on" );    //去除其他按钮样式

					var idx = $(this).index();
				$(".bd ul").eq(idx).show().siblings().hide();
			});
		});
		</script>
	</head>
	<body>
		<div class="tabox">
		      <div class="hd">
		        <ul>
		          <li class="on">疯狂抢购</li>
		          <li class=" ">猜您喜欢</li>
		          <li class=" ">热卖商品</li>
		          <li class=" ">热评商品</li>
		          <li class=" ">新品上架</li></ul>
		      </div>
		      <div class="bd">
		        <ul class="lh">
		          <img src="img/p1.jpg" >
		        </ul>
		        <ul class="lh" style="display: none;">
		          <img src="img/p2.jpg" >
		        </ul>
		        <ul class="lh" style="display: none;">
		          <img src="img/p3.jpg" >
		        </ul>
		        <ul class="lh" style="display: none;">
		          <img src="img/p4.jpg" >
		        </ul>
		        <ul class="lh" style="display: none;">
		          <img src="img/p5.jpg" >
		        </ul>
		      </div>
		</div>
	</body>
</html>
